package com.jd.task;

import com.jd.mapper.BookMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;

import org.springframework.stereotype.Component;

@Component
public class computTask {

    @Autowired
    private BookMapper bookMapper;

    /*每分钟执行一次，计算总的平均分*/
    //@Scheduled(cron = "0 * * * * ?")
    public void updateEvalutaion(){
        bookMapper.updateEvaluation();
        System.out.println("定时任务执行。。。");
    }
}
